﻿@ModelType IEnumerable(Of HSPElections1.Models.VoteNum)

@Code
    ViewData("Title") = "Index"
End Code

<h2>Index</h2>

<p>
    @Html.ActionLink("Vote Now", "MakeVote")
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            ------------
        </th>
        <th>
            President
        </th>
        <th>
            VicePresident
        </th>
        <th>
            Secretary
        </th>
        <th>
            Treasurer
        </th>
        <th>
            SergeantAtArms
        </th>
        <th></th>
    </tr>

@For Each item In Model
    Dim currentItem = item
    @<tr>
         
            @If currentItem.VoteNumId = 1 Then
                @<th>
                    Everett
                 </th>
            ElseIf currentItem.VoteNumId = 2 Then
                @<th>
                    Rebecca Gowen
                 </th>
            ElseIf currentItem.VoteNumId = 3 Then
                @<th>
                    Rebecca Peek
                 </th>
            ElseIf currentItem.VoteNumId = 4 Then
                @<th>Chris</th>
            ElseIf currentItem.VoteNumId = 5 Then
                @<th>Garret</th>
            End If
       
       
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.President)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.VicePresident)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.Secretary)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.Treasurer)
        </td>
        <td>
            @Html.DisplayFor(Function(modelItem) currentItem.SergeantAtArms)
        </td>
    </tr>
Next

</table>



